//
//  TKYRefreshHeader.m
//  SegmentManage
//
//  Created by apple on 2017/10/31.
//  Copyright © 2017年 铁科院. All rights reserved.
//

#import "TKYRefreshHeader.h"
@interface TKYRefreshHeader()
/** logo */
@property (nonatomic, weak) UIImageView *logo;
@end
@implementation TKYRefreshHeader
/**
 *  初始化
 */
- (void)prepare
{
    [super prepare];
    
    self.automaticallyChangeAlpha = YES;
    self.lastUpdatedTimeLabel.textColor = [UIColor orangeColor];
    self.stateLabel.textColor = [UIColor blackColor];
    [self setTitle:@"赶紧下拉吧" forState:MJRefreshStateIdle];
    [self setTitle:@"赶紧松开吧" forState:MJRefreshStatePulling];
    [self setTitle:@"正在加载数据..." forState:MJRefreshStateRefreshing];
    //    self.lastUpdatedTimeLabel.hidden = YES;
    //    self.stateLabel.hidden = YES;
    //[self addSubview:[[UISwitch alloc] init]];
    
//    UIImageView *logo = [[UIImageView alloc] init];
//    logo.image = [UIImage imageNamed:@"标段信息"];
//    [self addSubview:logo];
//    self.logo = logo;
}

/**
 *  摆放子控件
 */
- (void)placeSubviews
{
    [super placeSubviews];
    self.logo.kx_width = self.kx_width;
    self.logo.kx_height = 50;
    self.logo.kx_x = 0;
    self.logo.kx_y = - 50;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
